package com.efun.sample.service.impl;

import com.efun.sample.dao.PersonDao;
import com.efun.sample.entity.Person;
import com.efun.sample.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author kinven on 17/7/30.
 */
@Service
public class PersonServiceImpl implements PersonService {

    @Autowired
    PersonDao personDao;

    @Cacheable
    public List<Person> findAll(){
        return personDao.all();
    }
}
